package net.quanter.demo.junit5.dubbo.consumer.controller;

import net.quanter.demo.junit5.client.dto.UserDTO;
import net.quanter.demo.junit5.client.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/***
 *
 * 2020-06-08
 * @author harley-dog
 *
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    UserService userService;

    @GetMapping("/{id}")
    public UserDTO get(@PathVariable("id") Integer id){
        return userService.get(id);
    }
}
